package com.study.blog.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@ApiModel(value = "分类属性")
@Data
public class CategoryDTO implements Serializable {

    /**
     * 分类名称
     */
    @ApiModelProperty(value = "分类名称", required = true)
    @NotEmpty(message = "分类名称不能为空")
    private String categoryName;


    /**
     * 父级分类id
     */
    @ApiModelProperty(value = "父级分类id")
    private Long pid;
}
